//package com.wang.rabbitmq.springboot;
//
//import com.rabbitmq.client.Channel;
//import com.rabbitmq.client.Connection;
//import com.rabbitmq.client.ConnectionFactory;
//import org.springframework.amqp.core.AmqpTemplate;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.io.IOException;
//import java.nio.charset.StandardCharsets;
//import java.util.concurrent.TimeoutException;
//
///**
// * @author: wang
// * @date: 2021/8/4 18:42
// * @description:
// */
//@Component
//public class WorkSent {
//
//    @Resource
//    private AmqpTemplate amqpTemplate;
//
//
//    public void sentWorkPolling(){
//        for (int i = 0; i < 20; i++) {
//            amqpTemplate.convertAndSend("q1-key", i+"  polling test");
//        }
//    }
//}
